package nio;

import java.io.File;
import java.nio.CharBuffer;
import java.util.List;

/**
 * Created by Administrator on 2017/10/20 0020.
 */
public class Demo
{
    public static void main(String[] args)
    {
        CharBuffer buf = CharBuffer.allocate(8);
        System.out.println("capacity: " + buf.capacity());
        System.out.println("limit: " + buf.limit());
        System.out.println("position: " + buf.position());

        buf.put('A');
        buf.put('B');
        buf.put('C');
        System.out.println("three element added position = " + buf.position());
        buf.flip();
        System.out.println("after flip method called limit = " + buf.limit());
        System.out.println("after flip method called position = " + buf.position());
    }

//    private List<File> filterMov(String absPath)
//    {
//        File f = new File(absPath);
//        File [] fs = f.listFiles();
//        if(fs != null)
//        {
//            for(File ff : fs)
//            {
//                if(ff.isDirectory())
//                {
//
//                }
//            }
//        }
//    }
}
